package co.edu.javeriana.konigsberg.xavier.entidad;

import java.io.Serializable;
import java.math.BigInteger;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


/**
 * The persistent class for the programadepartamentofacultad database table.
 * 
 */
@Entity
@Table(name="programadepartamentofacultad")
@NamedQueries({
	@NamedQuery(name="ProgramaDepartamentoFacultad.findAll", query="SELECT p FROM ProgramaDepartamentoFacultad p"),
	@NamedQuery(name="ProgramaDepartamentoFacultad.findByProgram", query="SELECT p FROM ProgramaDepartamentoFacultad p where p.programa.idPrograma = :idPrograma"),
	@NamedQuery(name="ProgramaDepartamentoFacultad.deleteByParent", query="DELETE FROM ProgramaDepartamentoFacultad p WHERE p.programa.idPrograma = :idPrograma")
})
public class ProgramaDepartamentoFacultad implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private BigInteger idprogramaDepartamentoFacultad;
	
	@ManyToOne
	@JoinColumn(name="idPrograma")
	private Programa programa;

	@ManyToOne
	@JoinColumn(name="idDepartamentoFacultad")
	private DepartamentoFacultad departamentoFacultad;

	public BigInteger getIdprogramaDepartamentoFacultad() {
		return idprogramaDepartamentoFacultad;
	}

	public void setIdprogramaDepartamentoFacultad(
			BigInteger idprogramaDepartamentoFacultad) {
		this.idprogramaDepartamentoFacultad = idprogramaDepartamentoFacultad;
	}

	public Programa getPrograma() {
		return programa;
	}

	public void setPrograma(Programa programa) {
		this.programa = programa;
	}

	public DepartamentoFacultad getDepartamentoFacultad() {
		return departamentoFacultad;
	}

	public void setDepartamentoFacultad(DepartamentoFacultad departamentoFacultad) {
		this.departamentoFacultad = departamentoFacultad;
	}

}